/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package link;

/**
 *
 * @author RogerTroutman
 */
public class TypeMessage {

	// do not forget to expend this method
	// if new message types are defined
	// Be aware that election messages are not
	// taken into account here!
	public static boolean isGoodType(String type) {
		return (type.equals("SERVICES") || type.equalsIgnoreCase("DISCOVER")
				|| type.equalsIgnoreCase("MESSAGE")
				|| type.equalsIgnoreCase("ACK")
				|| type.equalsIgnoreCase("NACK")
				|| type.equalsIgnoreCase("JOIN")
				|| type.equalsIgnoreCase("ACCEPT"))
				|| type.equalsIgnoreCase("VECTOR")
				|| type.equalsIgnoreCase("HELLO")
                                || type.equalsIgnoreCase("NXTHOP");
	}

}
